package com.stxx.assistant.domain;

import cn.hutool.core.date.DateTime;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import lombok.Data;

import java.util.Date;

/**
 * @author Fuzhenlei
 * @date 2025/01/13 16:27
 */
@Data
public class SysTask {
    private String id;
    private String type;
    private String params;
    private Integer status;
    private String worker;
    private Date createTime;
    private Date execTime;
    private Date finishTime;
    private String remark;

    private Integer backStatus;
    private String attach;
    public <T> T paramsCast(Class<T> clazz){
        return JSONUtil.parseObj(params).toBean(clazz);
    }
}
